//package 百度生成唯一ID_UidGenerator;
//
//import com.baidu.fsg.uid.UidGenerator;
//import com.baidu.fsg.uid.impl.CachedUidGenerator;
//import org.mybatis.spring.annotation.MapperScan;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.boot.SpringApplication;
//import org.springframework.boot.autoconfigure.SpringBootApplication;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.ComponentScan;
//import org.springframework.web.bind.annotation.GetMapping;
//import org.springframework.web.bind.annotation.RestController;
//import 百度生成唯一ID_UidGenerator.conf.DisposableWorkerIdAssigner;
//import 百度生成唯一ID_UidGenerator.service.UidGenService;
//
//import java.util.List;
//
///**
// * @author caihe
// * @date 2021/5/25 11:58
// */
//@ComponentScan(basePackages = {"百度生成唯一ID_UidGenerator","com.baidu.fsg"})
//@MapperScan(value = {"百度生成唯一ID_UidGenerator.dao"})
//@SpringBootApplication
//@RestController
//public class BaiduApplication {
//
//
//    @Autowired
//    private UidGenService uidGenService;
//
//
//    public static void main(String[] args) {
//        SpringApplication.run(BaiduApplication.class, args);
//    }
//
//
//    @GetMapping("/getuid")
//    public String getUid() {
//        String s = String.valueOf(uidGenService.getUid());
//        System.out.println(s);
//        return s;
//    }
//
////    @Bean("disposableWorkerIdAssigner")
////    public DisposableWorkerIdAssigner disposableWorkerIdAssigner(){
////        DisposableWorkerIdAssigner disposableWorkerIdAssigner = new DisposableWorkerIdAssigner();
////        return  disposableWorkerIdAssigner;
////    }
//
//    @Bean("cachedUidGenerator")
//    public UidGenerator uidGenerator(DisposableWorkerIdAssigner disposableWorkerIdAssigner){
//        CachedUidGenerator cachedUidGenerator = new CachedUidGenerator();
//        cachedUidGenerator.setWorkerIdAssigner(disposableWorkerIdAssigner);
//        return cachedUidGenerator;
//    }
//
//}
